/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: AbstractListWrapper
 * Author:   zhuqifeng
 * Date:     2018/11/27 15:17
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.xlkj.ms.tools.core.response;

import java.util.List;

/**
 * List响应包装类
 * <pre>
 * {@code
 * {
 *     "code":"***",
 *     "msg":"****",
 *     "results":[{***},{***}]
 * }
 * }
 * </pre>
 * @author zhuqifeng
 * @date 2021/11/10 13:55
 * @package com.xlkj.ms.tools.core.response
 */
public abstract class AbstractListWrapper<E> extends AbstractResponse {

    private static final long serialVersionUID = -4938800396776264315L;

    /** 查询得到的分页结果集 */
    protected List<E> results;

    public AbstractListWrapper() {}

    public AbstractListWrapper(String code, String msg, List<E> results) {
        this.code = code;
        this.msg = msg;
        this.results = results;
    }

    public AbstractListWrapper(String code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public AbstractListWrapper(List<E> results) {
        this.results = results;
    }

    public List<E> getResults() {
        return results;
    }

    public void setResults(List<E> results) {
        this.results = results;
    }
}